﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DynamicControlLoader.ascx.cs" Inherits="AgileDashboard.controls.DynamicControlLoader" %>
    <script type="text/javascript">
    <!--
      $(document).ready(function() {
      $('#<%=DynamicPlaceholder.ClientID %>').showLoading({'addClass': 'loading-indicator-small'});
      $('#<%=DynamicPlaceholder.ClientID %>').load('/handlers/ucfactory.ashx?UserControlPath=<%=UserControlPath%>&<%=Params%>', {},
          function(response, status, xhr) {
              if (status == "error") {

                  window.location.replace("/Error.aspx?HostingUrl=<%=Server.UrlEncode(Request.Url.ToString()) %>");
                  
              }
              jQuery('#<%=DynamicPlaceholder.ClientID %>').hideLoading(); });
        });
    //-->
    </script>
    <div id="DynamicPlaceholder" runat="server"></div>